<include file="Public:_header" />
<body>
<include file="Public:top" />
<div class="main-container" id="main-container">
<script type="text/javascript">
	try{ace.settings.check('main-container' , 'fixed')}catch(e){}
</script>
<div class="main-container-inner">
<a class="menu-toggler" id="menu-toggler" href="#">
	<span class="menu-text"></span>
</a>

<include file="Public:left" />
<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>
		<!-- <ul class="breadcrumb">
			<li>
				<i class="icon-home home-icon"></i>
				<a href="#">Home</a>
			</li>

			<li>
				<a href="#">Other Pages</a>
			</li>
			<li class="active">Blank Page</li>
		</ul> -->

		<div class="nav-search" id="nav-search">
			<form class="form-search">
				<span class="input-icon">
					<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
					<i class="icon-search nav-search-icon"></i>
				</span>
			</form>
		</div><!-- #nav-search -->
	</div>

	<div class="page-content">
		<div class="row">
			<div class="col-xs-12">
				<div class="alert">
              <button type="button" class="close" data-dismiss="alert">&times;</button>
              <strong>提示</strong> 
              一天最多更改100-200次
            </div>
            <table class="table table-bordered">
                <tr>
                    <td width="60">排序</td>
                    <td width="300">名称</td>
                    <td >关键字(或者网址请加http://)</td>
                </tr>
            <volist name="volist" id="vo">
                <tr class="pid">
                    <td>
                        <input type="text" value="{$vo.ind}" name="ind" class="input-mini" ></td>
                    <td>
                        <input type="hidden" value="{$vo.id}" name="id" >
                        <input wid="{$vo.id}" type="text" value="{$vo.name}" name="name" ></td>
                    <td><input wid="{$vo.id}" type="text" class="input-xxlarge" value="{$vo.keyword}" name="keyword" ></td>
                </tr>
                <volist name="vo[item]" id="v">
                    <tr class="pid">
                        <td>
                            <input style="padding-left:18px;" type="text" value="{$v.ind}" name="ind" class="input-mini" ></td>
                        <td>
                            <input type="hidden" value="{$v.id}" name="id" >
                            |---<input wid="{$v.id}" type="text" value="{$v.name}" name="name" ></td>
                        <td ><input wid="{$v.id}" type="text" class="input-xxlarge" value="{$v.keyword}" name="keyword" ></td>
                    </tr>
                </volist>
            </volist>
                    </table>
                </div>
            </div>
            </div>
            <div class="pull-center well well-small">
                <a class="btn " href="{:U('Member/Wxmenu/insert')}">生成菜单</a>
                <a data-title="重建菜单" data-content="重建菜单将会完全删除你现有的数据,无法恢复,请慎用." data-trigger="confirm"  class="btn btn-danger" href="{:U('Member/Wxmenu/foreverdelete')}">重建菜单</a>
            </div>
			</div>
		</div>
	</div>
</div>
<include file="Public:settings" />
</div>

</div>
<include file="Public:footer" />

</body>
</html>
<script type="text/javascript">
$(function(){
    $('input[wid]').on('change',function(){
    	var fname = $(this).attr('name');
    	var fvalue = $(this).val();
    	var id = $(this).attr('wid');
    	var url = "{:U('Member/Wxmenu/ufname')}"
    	$.get(url,{id:id,fname:fname,fvalue:fvalue},function(){
    		//
    	})
    })
})
</script>
